﻿using System.Data;

namespace Codemonk.Common.Data
{
    public interface IDbDataAdapterCreater
    {
        IDbDataAdapter FillCommand(IDbDataAdapter adapter);

        IDbDataAdapter CreateDataAdapter();

        IDbDataAdapter CreateDataAdapter(IDbConnection connection, string cmdtext, params IDataParameter[] paras);

        IDbDataAdapter CreateDataAdapter(IDbConnection connection, string cmdtext, DbParameterBuilder builder);

        IDbDataAdapter CreateDataAdapter<T>(IDbConnection connection, string cmdtext, DbParameterBuilder<T> builder) where T : IDataParameter, new();

        IDbDataAdapter CreateDataAdapter(string cmdtext, params IDataParameter[] paras);

        IDbDataAdapter CreateDataAdapter(string cmdtext, DbParameterBuilder builder);

        IDbDataAdapter CreateDataAdapter<T>(string cmdtext, DbParameterBuilder<T> builder) where T : IDataParameter, new();

        IDbDataAdapter CreateDataAdapter(IDbCommand cmd);
    }
}
